package edu.pku.sei.mdabase.infrastructure.metamodel;

import edu.pku.sei.mdabase.basictypes.OCLVoidValue;
import edu.pku.sei.mdabase.core.IDataType;
import edu.pku.sei.mdabase.core.INamedElement;
import edu.pku.sei.mdabase.core.ITypedElement;
import edu.pku.sei.mdabase.infrastructure.Element;

public class MetaAttribute extends Element implements ITypedElement, INamedElement {
	private IDataType type;
	private String name;
	private Object defaultValue;

	public IDataType getType() {
		return type;
	}

	public void setType(IDataType type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Object getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(Object defaultValue) {
		if(defaultValue==null){
			defaultValue = OCLVoidValue.NULL_VALUE;
		}
		this.defaultValue = defaultValue;
	}
}
